package com.wfg.common.balance;

import com.wfg.common.Url;
import com.wfg.common.msg.Invocation;
import com.wfg.provider.Provider;

import java.util.List;
import java.util.Random;

/**
 * @author wufagang
 * @description
 * @date 2023年05月11日 08:17
 */
public class SimpleLoadBalance extends AbstractLoadbalance{
    public static Url random(List<Url> urlList) {
        Random random = new Random();
        System.out.println(urlList.size());
        int i = random.nextInt(urlList.size());
        return urlList.get(i);
    }

    @Override
    public Provider doSelect(Invocation invocation, List<Provider> t) {
        return null;
    }
}
